home *** CD-ROM | disk | FTP | other *** search
- Path: familynews.cycor.ca!usenet
- From: gcaine@cycor.ca (gcaine)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: simple K&R ANSI-C examples won't compile under SAS/C
- Date: 2 Mar 1996 13:50:31 GMT
- Organization: Cycor Communications Inc., Coast to Coast Internet Services
- Message-ID: <359.6634T885T1317@cycor.ca>
- References: <68771782@0humpty.tomate.tng.oche.de>
- NNTP-Posting-Host: skt-as011.cycor.ca
- X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
-
-
- > Hi,
-
- >this little example form the 'Kernighan&Ritchie' won't compile:
-
- >#include <stdio.h>
- >#include <clib/alib_stdio_protos.h>
-
- >main()
- >{
- > int c;
-
- > while((c = GetChar()) !=EOF)
- > PutChar(c);
- >}
-
- Try this:
-
- #include <stdio.h>
-
- main()
- {
- int c;
-
- while ((c = getchar()) != EOF)
- putchar(c);
- }
-
- Gary Caine Member: Team AMIGA
-
-